﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Help;
using Bll;
using System.Data;
using Model;


namespace Myproject.BSM.Ashx.PcChannel
{
    /// <summary>
    /// NewsDelete 的摘要说明
    /// </summary>
    public class NewsDelete : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string id = context.Request.QueryString["id"];
           
            if (new NewsBLL().Delete(int.Parse(id)))
            {
                context.Response.Write(ReturnJsonHelp.OutHandlerJson(true, "删除成功！"));
            }
            else
            {
                context.Response.Write(ReturnJsonHelp.OutHandlerJson(false, "删除失败！"));
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}